/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package negocio;

import java.util.ArrayList;

/**
 *
 * @author luiz.oliveira
 */
public class Permissao {
	private ArrayList<Integer> permissaoLista;
	
	public static final int JOGAR = 1;
	public static final int ADMINISTRAR = 2;
	
	public Permissao() {
		this.permissaoLista = new ArrayList<Integer>();
	}
	
	public void addPermissao(Integer permissao) {
		this.permissaoLista.add(permissao);
	}
	
	public boolean permite(int permissao) {
		return this.permissaoLista.contains(permissao);
	}
	
	public Integer[] toArray() {
		return this.permissaoLista.toArray(new Integer[this.permissaoLista.size()]);
	}
}